package com.cy.security;

public class Result {
	
	private Integer nValue;
	private String strValue;
	private boolean bResult;
	private String strResult;
	
	Result(){
		nValue = 0;
		strValue = "";
		bResult = false;
		strResult = "[error] no result created.";
	}
	
	public void success(String strValue, Integer nValue){
		this.nValue = nValue;
		this.strValue = strValue;
		this.bResult = true;
		this.strResult = "[success]";
	}
	
	public void fail(String msg){
		this.nValue = 0;
		this.strValue = "";
		this.bResult = false;
		this.strResult = "[failure] "+msg.trim();
	}
	
	public Integer getInt(){
		return this.nValue;
	}
	
	public String getStr(){
		return this.strValue;
	}
	
	public boolean isSuccess(){
		return this.bResult;
	}
	
	public String getMsg(){
		return this.strResult;
	}
}
